from machine import Pin,I2C
import utime
import machine
import esp32
# import IIC256
rst=Pin(2,Pin.OUT)
rst.value(0)
utime.sleep_ms(20)
rst.value(1)
# i2c=I2C(0,freq=400000)
i2c = I2C(1,scl=Pin(18), sda=Pin(19),freq=400000)
i2c.scan()
#i2c.writeto(63, b'0x00')
wake1 = Pin(27, mode = Pin.IN,pull=machine.Pin.PULL_DOWN)
esp32.wake_on_ext0(pin = wake1, level = esp32.WAKEUP_ANY_HIGH)
leds=machine.Pin(14,machine.Pin.IN,Pin.PULL_DOWN)
# leds.on()
leds=machine.Pin(14,machine.Pin.IN,Pin.PULL_UP)
# IIC256.LCDInit()
# IIC256.lcdClean()
# IIC256.print32("-0123.456789CV%",0,0)
# machine.deepsleep()
# machine.lightsleep(10000)